import 'package:json_annotation/json_annotation.dart';

part 'login_user.g.dart';

@JsonSerializable(explicitToJson: true)
class LoginUser {
  int userId;

  String username;

  String realname;

  String nickname;

  String phone;

  String headImage;

  String openid;

  int userType;

  int storeId;

  String storeNo;

  String storeName;

  int first;

  String token;
  String passWord;

  @JsonKey(defaultValue: false)
  bool isExpired;

  LoginUser(
    this.userId,
    this.username,
    this.realname,
    this.nickname,
    this.phone,
    this.headImage,
    this.openid,
    this.userType,
    this.storeId,
    this.storeNo,
    this.storeName,
    this.first,
    this.token,
    this.isExpired,
  );

  factory LoginUser.fromJson(Map<String, dynamic> srcJson) => _$LoginUserFromJson(srcJson);

  Map<String, dynamic> toJson() => _$LoginUserToJson(this);
}
